<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
        <script>
            var echoSocket = new WebSocket("ws://echo.websocket.org", ["com.kaazing.echo",
"example.imaginary.protocol"]);
            
            echoSocket.onopen = function(e){
                //Check the protocol chosen by the server
//                console.log(echoSocket.protocol);
                console.log('Connection open...');
            };
            
            echoSocket.onmessage = function(e){
                if (typeof e.data === 'string') {
                    console.log('String message received ', e, e.data);
                } else {
                    console.log('Other message received ', e, e.data);
                }
            };
            
        </script>
    </body>
</html>
